/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queenb.net.entitybean;

import java.io.Serializable;
import java.sql.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import oracle.jdbc.OracleTypes;
import queenb.net.annotation.Mapping;
import queenb.net.datacontrol.DataControl;
import queenb.web.util.Util;

/**
 *
 * @author Nguyen Hung
 */
public class C050 extends DataControl<C050> implements Serializable {
    @Mapping(name = "pc050", typeMapping = OracleTypes.INTEGER)
    private int pc050;
    @Mapping(name = "cv051", typeMapping = OracleTypes.CHAR)
    private String cv051;
     @Mapping(name = "cv052", typeMapping = OracleTypes.CHAR)
    private String cv052;
    @Mapping(name = "cd053", typeMapping = OracleTypes.DATE)
    private Date cd053;
    @Mapping(name = "cd054", typeMapping = OracleTypes.DATE)
    private Date cd054;
    
    private String time1;
    private String time2;

    
   
    /**
     * @return the pc050
     */
    public int getPc050() {
        return pc050;
    }

    /**
     * @param pc050 the pc050 to set
     */
    public void setPc050(int pc050) {
        this.pc050 = pc050;
    }

    /**
     * @return the cv051
     */
    public String getCv051() {
        return cv051;
    }

    /**
     * @param cv051 the cv051 to set
     */
    public void setCv051(String cv051) {
        this.cv051 = cv051;
    }

    /**
     * @return the cd053
     */
    public Date getCd053() {
        return cd053;
    }

    /**
     * @param cd053 the cd053 to set
     */
    public void setCd053(Date cd053) {
        this.cd053 = cd053;
    }

    /**
     * @return the cd054
     */
    public Date getCd054() {
        return cd054;
    }

    /**
     * @param cd054 the cd054 to set
     */
    public void setCd054(Date cd054) {
        this.cd054 = cd054;
    }

    /**
     * @return the cv052
     */
    public String getCv052() {
        return cv052;
    }

    /**
     * @param cv052 the cv052 to set
     */
    public void setCv052(String cv052) {
        this.cv052 = cv052;
    }

    /**
     * @return the time1
     */
    public String getTime1() {
         DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
    
        //    Date datecurent = new Date();
          //  cd053 = Util.toSQLDate(cd053);
          
            String total = dateFormat.format(Util.toSQLDate(cd053));
             // System.out.println("---------------------NGAY--"+ nd353p);
          String  nv952 = total.substring(0,4);
                String    nv954 =  total.substring(5, 7);
                   String  nv955 =  total.substring(8, 10);
                   time1 = nv955+"/"+nv954+"/"+nv952;
        return time1;
    }

    /**
     * @param time1 the time1 to set
     */
    public void setTime1(String time1) {
        this.time1 = time1;
    }

    /**
     * @return the time2
     */
    public String getTime2() {
       DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
    
        //    Date datecurent = new Date();
          //  cd053 = Util.toSQLDate(cd053);
          
            String total = dateFormat.format(Util.toSQLDate(cd054));
             // System.out.println("---------------------NGAY--"+ nd353p);
          String  nv952 = total.substring(0,4);
                String    nv954 =  total.substring(5, 7);
                   String  nv955 =  total.substring(8, 10);
                   time2 = nv955+"/"+nv954+"/"+nv952;
        return time2;
    }

    /**
     * @param time2 the time2 to set
     */
    public void setTime2(String time2) {
        this.time2 = time2;
    }
}
